package com.gccloud.design.feign;

import com.gccloud.design.entity.StfBusinessProcessEntity;
import com.gccloud.feign.filter.FeignRequestFilter;
import com.gccloud.starter.common.vo.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @author guo.wang
 */
@FeignClient(name = "bwp-web-lowcode", path = "${bwp.server.context:/bwp}", contextId = "part1", configuration = {FeignRequestFilter.class})
public interface BwpWebClient {
    /**
     * 删除流程
     *
     * @param id 流程id
     * @return R<BwpBusinessProcessEntity>
     */
    @DeleteMapping("/businessProcess/{id}")
    R deleteProcess(@PathVariable String id);

    /**
     * 修改流程
     *
     * @param stfBusinessProcessEntity 流程entity
     * @return R<BwpBusinessProcessEntity>
     */
    @PutMapping("/businessProcess")
    R updateProcess(@RequestBody StfBusinessProcessEntity stfBusinessProcessEntity);

    /**
     * 新增流程
     *
     * @param stfBusinessProcessEntity 流程entity
     * @return R<BwpBusinessProcessEntity>
     */
    @PostMapping("/businessProcess")
    R<String> insertProcess(@RequestBody StfBusinessProcessEntity stfBusinessProcessEntity);
}
